<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	//Kumomado main path
	define('KUMOMADO_ROOT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
	define('KUMOMADO_FRAMEWORK_PATH', KUMOMADO_ROOT_PATH.'framework'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_LIBRARIES_PATH', KUMOMADO_FRAMEWORK_PATH.'libraries'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_EXCEPTIONS_PATH', KUMOMADO_FRAMEWORK_PATH.'exceptions'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_OBJECTS_PATH', KUMOMADO_ROOT_PATH.'objects'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_CONFIG_PATH', KUMOMADO_ROOT_PATH.'config'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_PLATFORM_PATH', KUMOMADO_ROOT_PATH.'platform'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_APPLICATIONS_PATH', KUMOMADO_ROOT_PATH.'applications'.DIRECTORY_SEPARATOR);
	define('KUMOMADO_WEB_PATH', KUMOMADO_ROOT_PATH.'web'.DIRECTORY_SEPARATOR);

	define('KUMOMADO_URL', 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/');
	define('KUMOMADO_APPLICATIONS_URL', KUMOMADO_URL.'applications/');
	define('KUMOMADO_PLATFORM_URL', KUMOMADO_URL.'platform/');
	define('KUMOMADO_PLATFORM_THEME', KUMOMADO_PLATFORM_URL.'layouts/default/');
	define('KUMOMADO_JAVASCRIPTS_URL', KUMOMADO_URL.'framework/libraries/javascripts/');

	include_once KUMOMADO_FRAMEWORK_PATH.'Kumomado.class.php';

	global $Kumomado;
	$Kumomado = Kumomado::getInstance();

	/*Session Start*/
	if (!isset($_SESSION)) {
		session_start();
	}
	if (isset($_GET['lang'])) {
		$_SESSION['language'] = $_GET['lang'];
	}
	/**Session End*/
?>